<div class="column prepend-1 span-5 append-1">
  <h4 class="actions">Actions</h4>

  <ul class="actions">
    <%= link_to_action 'Edit your profile', personal_user_url(current_user) %>
    <%= link_to_action 'Invite colleagues',new_user_invite_url(current_user) %>
    <%= link_to_action 'View your public profile', profile_path(current_user) %>
  </ul>

  <% if @user.pending_friendships.size > 0 %>
  <div class="received_colleague_requests">
    <h4>Received Colleague Requests</h4>
    <dl>
      <% @user.pending_friendships.each do |friend| %>
      <dt><%= link_to friend.name, profile_url(friend.login) %></dt>
      <dd><%= link_to 'Accept', profile_friendship_url(friend.login), :method => :post %> or <%= link_to 'Decline', decline_profile_friendship_url(friend.login), :method => :delete %></dd>
      <% end %>
    </dl>
  </div>
  <% end %>

  <% if @user.requested_friendships.size > 0 %>
  <div class="sent_colleague_requests">
    <h4>Sent Colleague Requests</h4>
    <dl>
      <% @user.requested_friendships.each do |friend| %>
        <dt><%= link_to friend.name, profile_url(friend.login) %></dt>
        <dd><%= link_to 'Withdraw', withdraw_profile_friendship_url(friend.login), :confirm => "Are you sure you want to withdraw the colleague request for #{friend.login}", :method => :delete %></dd>
      <% end %>
    </dl>
  </div>
  <% end %>

</div>
